<ul class="layui-tab-title site-demo-title">
    <li class="">查看菜单列表</li>
    <li class="layui-this">添加菜单</li>
</ul>
<form class="layui-form layui-form-pane  layui-inline main-content"  action="">
    <div class="layui-form-item">
        <label class="layui-form-label">菜单名称</label>
        <div class="layui-input-inline">
            <input type="text" name="username" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">跳转路径</label>
        <div class="layui-input-block">
            <input type="text" name="title" autocomplete="off" placeholder="请输入url" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">单行选择框</label>
        <div class="layui-input-block">
            <select name="interest" lay-filter="aihao">
                <option value=""></option>
                <option value="0">写作</option>
                <option value="1" selected="">阅读</option>
                <option value="2">游戏</option>
                <option value="3">音乐</option>
                <option value="4">旅行</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item layui-inline">
        <button class="layui-btn"  lay-submit="" lay-filter="demo2" style="margin: 0 auto;">提交</button>
    </div>
</form>
<script>
    function renderForm() {
        layui.use('form', function() {
            var form = layui.form; //高版本建议把括号去掉，有的低版本，需要加()
            form.render();
        });
    }
    renderForm();
</script>